home *** CD-ROM | disk | FTP | other *** search
/ Winzipper / Winzipper_ISO.iso / nt4.0 server / OEMNADLB.IN_ / oemnadlb.inf
INI File  |  1996-07-12  |  25KB  |  687 lines

  1. [Identification]
  2.     OptionType = NetAdapter
  3. [PlatformsSupported]
  4.     ISA
  5.     EISA
  6.     MCA
  7.     "Jazz-Internal Bus"
  8. [Options]
  9.     LOOP
  10. [FileConstants]
  11. UtilityInf      = "UTILITY.INF"
  12. ParamInf        = "NCPARAM.INF"
  13. subroutineinf   = "SUBROUTN.INF"
  14. SoftwareType    = "driver"
  15. Exit_Code       = 0
  16. NetEventDLL     = "%SystemRoot%\System32\netevent.dll"
  17. IoLogMsgDLL     = "%SystemRoot%\System32\IoLogMsg.dll"
  18. Manufacturer    = "Microsoft"
  19. ProductMajorVersion     = "4"
  20. ProductMinorVersion     = "0"
  21. ProductVersion  = $(ProductMajorVersion)"."$(ProductMinorVersion)
  22. ProductSoftwareName     = "NDISLoop"
  23. ProductSoftwareImagePath = "\SystemRoot\System32\drivers\loop.sys"
  24. NetRuleSoftwareType     = "loopSys ndisDriver loopDriver"
  25. NetRuleSoftwareUse      = $(SoftwareType)
  26. NetRuleSoftwareBindForm = """LoopSys"" yes no container"
  27. NetRuleSoftwareClass    = {"loopDriver basic"}
  28. NetRuleSoftwareBindable = {"loopDriver loopAdapter non exclusive 100"}
  29. ProductHardwareName     = "NDISLoop"
  30. NetRuleHardwareType     = "loop loopAdapter"
  31. NetRuleHardwareBindForm = " yes yes container"
  32. NetRuleHardwareClass    = {"loopAdapter basic"}
  33. ProductOpSupport     = 134 
  34. ProductKeyName  = $(!NTN_SoftwareBase)"\"$(Manufacturer)"\"$(ProductSoftwareName)"\CurrentVersion"
  35. ParamKeyName    = $(!NTN_ServiceBase)"\"$(ProductHardwareName)"\Parameters"
  36. [GeneralConstants]
  37. from      = ""
  38. to        = ""
  39. ExitCodeOk     = 0
  40. ExitCodeCancel = 1
  41. ExitCodeFatal  = 2
  42. KeyNull         = ""
  43. MAXIMUM_ALLOWED   = 33554432
  44. RegistryErrorIndex = NO_ERROR
  45. KeyProduct      = ""
  46. KeyParameters   = ""
  47. TRUE            = 1
  48. FALSE           = 0
  49. NoTitle            = 0
  50. ExitState   = "Active"
  51. OldVersionExisted = $(FALSE)
  52. DriverPath      = $(!STF_NTPATH)\drivers
  53. [date]
  54.     Now = {} ? $(!LIBHANDLE) GetSystemDate
  55. [Identify]
  56.     read-syms Identification
  57.     set Status     = STATUS_SUCCESSFUL
  58.     set Identifier = $(OptionType)
  59.     set Media      = #("Source Media Descriptions", 1, 1)
  60.     Return $(Status) $(Identifier) $(Media)
  61. [ReturnOptions]
  62.     set Status        = STATUS_FAILED
  63.     set OptionList     = {}
  64.     set OptionTextList = {}
  65.     set LanguageList = ^(LanguagesSupported, 1)
  66.     Ifcontains(i) $($0) in $(LanguageList)
  67.         ifstr(i) $($1) == ""
  68.            goto returnoptions
  69.         endif
  70.         set PlatformList = ^(PlatformsSupported, 1)
  71.         Ifcontains(i) $($1) in $(PlatformList)
  72.            goto returnoptions
  73.         else
  74.            set Status = STATUS_NOTSUPPORTED
  75.            goto finish_ReturnOptions
  76.         endif
  77.     else
  78.         set Status = STATUS_NOLANGUAGE
  79.         goto finish_ReturnOptions
  80.     endif
  81. returnoptions = +
  82.     set OptionList     = ^(Options, 1)
  83.     set OptionTextList = ^(OptionsText$($0), 1)
  84.     set Status         = STATUS_SUCCESSFUL
  85. finish_ReturnOptions = +
  86.     Return $(Status) $(OptionList) $(OptionTextList)
  87. [InstallOption]
  88.     set Option   = $($1)
  89.     set SrcDir   = $($2)
  90.     set AddCopy  = $($3)
  91.     set DoCopy   = $($4)
  92.     set DoConfig = $($5)
  93.     set LanguageList = ^(LanguagesSupported, 1)
  94.     Ifcontains(i) $($0) NOT-IN $(LanguageList)
  95.         Return STATUS_NOLANGUAGE
  96.     endif
  97.     set-subst LF = "\n"
  98.     set !STF_DISPLAYDEBUGOUTPUT = 1
  99.     read-syms GeneralConstants
  100.     read-syms FileConstants
  101.     read-syms DialogConstants$(!STF_LANGUAGE)
  102.     ifstr(i) $(!NTN_Origination) == "NCPA"
  103.         set Continue = $(OK)
  104.     endif
  105.     read-syms FileConstants$(!STF_LANGUAGE)
  106.     detect date
  107.     set-title  $(FunctionTitle)
  108.     set to   = Begin
  109.     set from = Begin
  110.     set CommonStatus = STATUS_SUCCESSFUL
  111.     EndWait
  112. Begin = +
  113.     Ifstr(i) $(!NTN_InstallMode) == deinstall
  114.         set StartLabel = removeadapter
  115.     else-Ifstr(i) $(!NTN_InstallMode) == Update
  116.         set StartLabel = UpgradeSoftware
  117.     else-Ifstr(i) $(!NTN_InstallMode) == bind
  118.         set StartLabel = bindingadapter
  119.     else-Ifstr(i) $(!NTN_InstallMode) == configure
  120.         set CommonStatus = STATUS_REBOOT
  121.         set StartLabel = configureadapter
  122.         Ifstr(i) $(ProductKeyName) == $(!NTN_RegBase)
  123.             Debug-Output "Cannot configure the Loopback driver software."
  124.             Shell $(UtilityInf),RegistryErrorString,CANNOT_CONFIGURE_SOFTWARE
  125.             ifint $($ShellCode) != $(!SHELL_CODE_OK)
  126.                 Debug-Output "ShellCode error: cannot get an error string."
  127.                 goto ShellCodeError
  128.             endif
  129.             set Error = $($R0)
  130.             set from = end
  131.             set to = end
  132.             goto nonfatalinfo
  133.         endif
  134.     else
  135.         set StartLabel = installadapter
  136.         set OEM_ABANDON_OPTIONS = {}
  137.         set OEM_ABANDON_SOFTWARE = FALSE
  138.         set OEM_ABANDON_ON = TRUE
  139.     endif
  140.     set MediaList = {"802.3","802.5","Fddi"}
  141.     set MediaChoice = *($(MediaList),1)
  142.     set from = $(fatal)
  143.     set to = $(fatal)
  144.     goto $(StartLabel)
  145. installadapter = +
  146.     OpenRegKey $(!REG_H_LOCAL) "" $(ProductKeyName) $(MAXIMUM_ALLOWED) KeyProduct
  147.     Ifstr $(KeyProduct) != $(KeyNull)
  148.         CloseRegKey $(KeyProduct)
  149.         ifstr(i) !(NTN_RegBase) == $(ProductKeyName)
  150.            Shell $(UtilityInf), VerExistedDlg, $(ProductSoftwareTitle),+
  151.                $(ProductVersion)
  152.            ifint $($ShellCode) != $(!SHELL_CODE_OK)
  153.                Debug-Output "ShellCode error: cannot get an error string."
  154.                goto ShellCodeError
  155.            endif
  156.            goto end
  157.         else
  158.            Shell $(UtilityInf), CardExistedDlg
  159.            ifint $($ShellCode) != $(!SHELL_CODE_OK)
  160.                Debug-Output "ShellCode error: cannot get an error string."
  161.                goto ShellCodeError
  162.            endif
  163.            ifstr(i) $($R1) != "OK"
  164.                set CommonStatus = STATUS_USERCANCEL
  165.                goto end
  166.            endif
  167.            set OldVersionExisted = $(TRUE)
  168.         endif
  169.     endif
  170.     goto adapteroptions
  171. configureadapter = +
  172.     Ifstr $(KeyProduct) == $(KeyNull)
  173.         OpenRegKey $(!REG_H_LOCAL) "" $(!NTN_RegBase) $(MAXIMUM_ALLOWED) KeyProduct
  174.         Ifstr $(KeyProduct) == $(KeyNull)
  175.             set RegistryErrorIndex = CANNOT_FIND_COMPONENT_SERVICE
  176.             Debug-Output "Cannot find component product key"
  177.             goto fatalregistry
  178.         Endif
  179.     Endif
  180.     Debug-Output "INF: Shelling to FindService"
  181.     Shell $(UtilityInf) FindService, $(KeyProduct)
  182.     Ifint $($ShellCode) != $(!SHELL_CODE_OK)
  183.         Debug-Output "INF: FindService shell failure"
  184.         Goto ShellCodeError
  185.     Endif
  186.     Ifstr(i) $($R0) != NO_ERROR
  187.         Debug-Output "INF: FindService Shell error: "$($R0)
  188.         Goto fatalregistry
  189.     endif
  190.     set KeyParameters = $($R2)
  191.     CloseRegKey $($R1)
  192.     Ifstr $(KeyParameters) == $(KeyNull)
  193.         set RegistryErrorIndex = CANNOT_FIND_COMPONENT_SERVICE
  194.         Debug-Output "Cannot find component service"
  195.         goto fatalregistry
  196.     endif
  197.     set OldVersionExisted = $(TRUE )
  198.     set ValueName = ""
  199.     set ValueData = ""
  200.     set ValueStr  = ""
  201.     set ValueList = {}
  202.     EnumRegValue $(KeyParameters) ValueList
  203.     ForListDo $(ValueList)
  204.         set ValueItem = $($)
  205.         set ValueName = *($(ValueItem),1)
  206.         set ValueData = *($(ValueItem),4)
  207.         Ifstr(i) $(ValueName) == "Medium"
  208.             ifint $(ValueData) == "1"
  209.                 set MediaChoice = *($(MediaList),2)
  210.             else-ifint $(ValueData) == "2"
  211.                 set MediaChoice = *($(MediaList),3)
  212.             else
  213.                 set MediaChoice = *($(MediaList),1)
  214.             endif
  215.         endif
  216.     EndForListDo
  217. adapteroptions = +
  218.     set from = adapteroptions
  219.     ifstr(i) $(!STF_INSTALL_MODE) == EXPRESS
  220.         set MediaChoice = *($(MediaList),1)
  221.     else
  222.         read-syms FileDependentDlg$(!STF_LANGUAGE)
  223.         ui start "InputDlg"
  224.         ifstr(i) $(DLGEVENT) == "CONTINUE"
  225.             set MediaChoice = $(Combo1Out)
  226.             ui pop 1
  227.         else-ifstr(i) $(DLGEVENT) == "BACK"
  228.             set CommonStatus = STATUS_USERCANCEL
  229.             Debug-Output "OEMNADLB.INF: Action: exit. Bye."
  230.             ui pop 1
  231.             goto end
  232.         else
  233.             ui pop 1
  234.             Debug-Output "OEMNADLB.INF: Action: unknown. Bye."
  235.             goto end
  236.         endif
  237.     endif
  238.     Debug-Output "OEMNADLB.INF: setting media choice to: "$(MediaChoice)
  239. skipoptions = +
  240.     ifint $(OldVersionExisted) == $(TRUE)
  241.         ifstr(i) $(!NTN_InstallMode) == configure
  242.             goto writeparameters
  243.         endif
  244.     endif
  245.     StartWait
  246.     Ifint $(OldVersionExisted) != $(FALSE)
  247.         Goto installhardware
  248.     Endif
  249.     ifstr(i) $(!NTN_InstallMode) == "install"
  250.        Ifstr(i) $(DoCopy) == "YES"
  251.           Shell $(UtilityInf), DoAskSource, $(!STF_CWDDIR), $(SrcDir) YES
  252.           Ifint $($ShellCode) != $(!SHELL_CODE_OK)
  253.               Goto ShellCodeError
  254.           Else-Ifstr(i) $($R0) == STATUS_FAILED
  255.               Shell $(UtilityInf) RegistryErrorString "ASK_SOURCE_FAIL"
  256.               ifint $($ShellCode) != $(!SHELL_CODE_OK)
  257.                   goto ShellCodeError
  258.               endif
  259.               set Error = $($R0)
  260.               Goto fatal
  261.           Else-Ifstr(i) $($R0) == STATUS_USERCANCEL
  262.               Goto successful
  263.           Endif
  264.           Set SrcDir = $($R1)
  265.        Endif
  266.        install "Install-Option"
  267.        ifstr(i) $(STF_INSTALL_OUTCOME) != STF_SUCCESS
  268.            Shell $(UtilityInf) RegistryErrorString "UNABLE_COPY_FILE"
  269.            ifint $($ShellCode) != $(!SHELL_CODE_OK)
  270.                goto ShellCodeError
  271.            endif
  272.            set Error = $($R0)
  273.            goto fatal
  274.        endif
  275.     endif
  276.     Shell $(UtilityInf), AddSoftwareComponent, $(Manufacturer), +
  277.         $(ProductSoftwareName), +
  278.         $(ProductSoftwareName), +
  279.         $(ProductSoftwareName), $(STF_CONTEXTINFNAME), +
  280.         $(ProductSoftwareImagePath), "kernel", "NDIS", {}, "",+
  281.         $(NetEventDLL)
  282.     Set OEM_ABANDON_SOFTWARE = TRUE
  283.     ifint $($ShellCode) != $(!SHELL_CODE_OK)
  284.             Debug-Output "ShellCode error"
  285.             goto ShellCodeError
  286.     endif
  287.     set RegistryErrorIndex = $($R0)
  288.     Ifstr(i) $(RegistryErrorIndex) != NO_ERROR
  289.             EndWait
  290.             Debug-Output "Registry error: add software components"
  291.             CloseRegKey $($R1)
  292.             CloseRegKey $($R2)
  293.             CloseRegKey $($R3)
  294.             CloseRegKey $($R4)
  295.         CloseRegKey $($R5)
  296.         goto fatalregistry
  297.     endif
  298.     set SoftProductKey   = $($R1)
  299.     Set SoftNetRuleKey   = $($R2)
  300.     Set SoftServiceKey   = $($R3)
  301.     Set SoftParameterKey = $($R4)
  302.     Set SoftLinkageKey   = $($R5)
  303.     set NewValueList = {{SoftwareType,$(NoTitle),$(!REG_VT_SZ),$(SoftwareType)},+
  304.                        {MajorVersion,$(NoTitle),$(!REG_VT_DWORD),$(ProductMajorVersion)},+
  305.                        {MinorVersion,$(NoTitle),$(!REG_VT_DWORD),$(ProductMinorVersion)},+
  306.                        {Title,$(NoTitle),$(!REG_VT_SZ),$(ProductSoftwareTitle)},+
  307.                        {Description,$(NoTitle),$(!REG_VT_SZ),$(ProductSoftwareDescription)},+
  308.                        {ServiceName,$(NoTitle),$(!REG_VT_SZ),$(ProductSoftwareName)},+
  309.                        {InstallDate,$(NoTitle),$(!REG_VT_DWORD),*($(Now),1)}}
  310.     Shell  $(UtilityInf), AddValueList, $(SoftProductKey), $(NewValueList)
  311.     ifint $($ShellCode) != $(!SHELL_CODE_OK)
  312.             Debug-Output "ShellCode error."
  313.             goto ShellCodeError
  314.     endif
  315.     set RegistryErrorIndex = $($R0)
  316.     Ifstr(i) $(RegistryErrorIndex) != NO_ERROR
  317.             EndWait
  318.             Debug-Output "Resgitry error: add value list."
  319.             CloseRegKey $(SoftProductKey)
  320.             CloseRegKey $(SoftNetRuleKey)
  321.             CloseRegKey $(SoftServiceKey)
  322.             CloseRegKey $(SoftParameterKey)
  323.         CloseRegKey $(SoftLinkageKey)
  324.         goto fatalregistry
  325.     endif
  326.     set NewValueList = {{type,$(NoTitle),$(!REG_VT_SZ),$(NetRuleSoftwareType)},+
  327.                         {use,$(NoTitle),$(!REG_VT_SZ),$(NetRuleSoftwareUse)}, +
  328.                         {class,$(NoTitle),$(!REG_VT_MULTI_SZ),$(NetRuleSoftwareClass)}, +
  329.                         {bindable,$(NoTitle),$(!REG_VT_MULTI_SZ),$(NetRuleSoftwareBindable)}, +
  330.                         {bindform,$(NoTitle),$(!REG_VT_SZ),$(NetRuleSoftwareBindForm)}, +
  331.                         {InfOption,$(NoTitle),$(!REG_VT_SZ),$(Option)}}
  332.     Shell  $(UtilityInf), AddValueList, $(SoftNetRuleKey), $(NewValueList)
  333.     ifint $($ShellCode) != $(!SHELL_CODE_OK)
  334.             Debug-Output "ShellCode error."
  335.             goto ShellCodeError
  336.     endif
  337.     set RegistryErrorIndex = $($R0)
  338.     CloseRegKey $(SoftProductKey)
  339.     CloseRegKey $(SoftNetRuleKey)
  340.     CloseRegKey $(SoftServiceKey)
  341.     CloseRegKey $(SoftParameterKey)
  342.     CloseRegKey $(SoftLinkageKey)
  343.     Ifstr(i) $(RegistryErrorIndex) != NO_ERROR
  344.         EndWait
  345.         Debug-Output "Resgitry error: add value list."
  346.         goto fatalregistry
  347.     endif
  348. installhardware =+
  349.     Shell $(UtilityInf), AddHardwareComponent, $(ProductHardwareName),$(STF_CONTEXTINFNAME),$(ProductKeyName)
  350.     ifint $($R4) != -1
  351.         Set OEM_ABANDON_OPTIONS = >($(OEM_ABANDON_OPTIONS), $(!NTN_SoftwareBase)"\Microsoft\Windows NT\CurrentVersion\NetworkCards\"$($R4))
  352.     endif
  353.     ifint $($ShellCode) != $(!SHELL_CODE_OK)
  354.         Debug-Output "Cannot add hardware component"
  355.         goto ShellCodeError
  356.     endif
  357.     set RegistryErrorIndex = $($R0)
  358.     Ifstr(i) $(RegistryErrorIndex) != NO_ERROR
  359.         EndWait
  360.         Debug-Output "Registry error: add hardware component"
  361.         CloseRegKey $($R1)
  362.         CloseRegKey $($R2)
  363.         CloseRegKey $($R3)
  364.         goto fatalregistry
  365.     endif
  366.     set KeyParameters = $($R3)
  367.     set KeyAdapterRules = $($R2)
  368.     set AdapterNumber = $($R4)
  369.     set NewValueList = {{Manufacturer,$(NoTitle),$(!REG_VT_SZ),$(Manufacturer)},+
  370.                        {Title,$(NoTitle),$(!REG_VT_SZ),"["$($R4)"] "$(ProductHardwareTitle)},+
  371.                        {Description,$(NoTitle),$(!REG_VT_SZ),$(ProductHardwareDescription)},+
  372.                        {ProductName,$(NoTitle),$(!REG_VT_SZ),$(ProductHardwareName)},+
  373.                        {ServiceName,$(NoTitle),$(!REG_VT_SZ),$($R5)},+
  374.                        {OperationsSupport,$(NoTitle),$(!REG_VT_DWORD),$(ProductOpSupport)},+
  375.                        {InstallDate,$(NoTitle),$(!REG_VT_DWORD),*($(Now),1)}}
  376.     Shell  $(UtilityInf), AddValueList, $($R1), $(NewValueList)
  377.     ifint $($ShellCode) != $(!SHELL_CODE_OK)
  378.         Debug-Output "ShellCode error"
  379.         goto ShellCodeError
  380.     endif
  381.     CloseRegKey $($R1)
  382.     set TempProdName = """"$(ProductHardwareName)$(AdapterNumber)""""
  383.     set TempBindForm = $(TempProdName)$(NetRuleHardwareBindForm)
  384.     set NewValueList = {{type,$(NoTitle),$(!REG_VT_SZ),$(NetRuleHardwareType)},+
  385.                         {bindform,$(NoTitle),$(!REG_VT_SZ),$(TempBindForm)}, +
  386.                         {class,$(NoTitle),$(!REG_VT_MULTI_SZ),$(NetRuleHardwareClass)}, +
  387.                         {InfOption,$(NoTitle),$(!REG_VT_SZ),$(Option)}}
  388.     Shell  $(UtilityInf), AddValueList, $(KeyAdapterRules), $(NewValueList)
  389.     ifint $($ShellCode) != $(!SHELL_CODE_OK)
  390.         Debug-Output "ShellCode error."
  391.         goto ShellCodeError
  392.     endif
  393.     set RegistryErrorIndex = $($R0)
  394.     Ifstr(i) $(RegistryErrorIndex) != NO_ERROR
  395.         EndWait
  396.         Debug-Output "Registry error: add value list."
  397.         CloseRegKey $(KeyParameters)
  398.         CloseRegKey $(KeyAdapterRules)
  399.         goto fatalregistry
  400.     endif
  401.     CloseRegKey $(KeyAdapterRules)
  402.     goto writeparameters
  403. writeparameters = +
  404.     ifstr(i) $(MediaChoice) == "802.5"
  405.         set MediaValue = 1
  406.     else-ifstr(i) $(MediaChoice) == "Fddi"
  407.         set MediaValue = 2
  408.     else
  409.         set MediaValue = 0
  410.     endif
  411.     Shell $(UtilityInf), GetBusTypeNum
  412.     set BusTypeNum = $($R1)
  413.     ifint $($ShellCode) != $(!SHELL_CODE_OK)
  414.         Debug-Output "ShellCode error."
  415.         goto ShellCodeError
  416.     endif
  417.     set-add MediaType = $(MediaValue),1
  418.     set NewValueList = {+
  419.                        {Medium,$(NoTitle),$(!REG_VT_DWORD),$(MediaValue)},+
  420.                        {MediaType,$(NoTitle),$(!REG_VT_DWORD),$(MediaType)},+
  421.                        {BusType,$(NoTitle),$(!REG_VT_DWORD),$(BusTypeNum)},+
  422.                        }
  423.     Shell  $(UtilityInf), AddValueList, $(KeyParameters), $(NewValueList)
  424.     ifstr(i) $(!STF_GUI_UNATTENDED) == "YES"
  425.         Shell $(UtilityInf),AddDefaultNetCardParameters,$(KeyParameters)
  426.     endif
  427.     CloseRegKey $(KeyParameters)
  428.     ifint $($ShellCode) != $(!SHELL_CODE_OK)
  429.         Debug-Output "ShellCode error."
  430.         goto ShellCodeError
  431.     endif
  432.     set RegistryErrorIndex = $($R0)
  433.     Ifstr(i) $(RegistryErrorIndex) != NO_ERROR
  434.         Debug-Output "Registry error: Add value list"
  435.         goto fatalregistry
  436.     endif
  437.     EndWait
  438.     goto successful
  439. bindingadapter =+
  440.     set Error = "Binding: Sorry, not yet implemented."
  441.     goto fatal
  442. removeadapter = +
  443.     Ifstr(i) $(ProductKeyName) == $(!NTN_RegBase)
  444.         Shell $(UtilityInf), RemoveSoftwareComponent, $(Manufacturer), +
  445.             $(ProductSoftwareName)
  446.         ifint $($ShellCode) != $(!SHELL_CODE_OK)
  447.             Debug-Output "ShellCode error"
  448.             goto ShellCodeError
  449.         endif
  450.         set RegistryErrorIndex = $($R0)
  451.         Ifstr(i) $(RegistryErrorIndex) != NO_ERROR
  452.             goto fatalregistry
  453.         endif
  454.     else
  455.         Shell $(UtilityInf), RemoveHardwareComponent, $(Manufacturer), +
  456.             $(ProductSoftwareName), $(!NTN_RegBase)
  457.         ifint $($ShellCode) != $(!SHELL_CODE_OK)
  458.             Debug-Output "ShellCode error"
  459.             goto ShellCodeError
  460.         endif
  461.         set RegistryErrorIndex = $($R0)
  462.         Ifstr(i) $(RegistryErrorIndex) != NO_ERROR
  463.             goto fatalregistry
  464.         endif
  465.     endif
  466.     goto end
  467. UpgradeSoftware = +
  468.     OpenRegKey $(!REG_H_LOCAL) "" $(ProductKeyName) $(MAXIMUM_ALLOWED) KeyProduct
  469.     Ifstr $(KeyProduct) != $(KeyNull)
  470.         install "Install-Update"
  471.         ifstr(i) $(STF_INSTALL_OUTCOME) != STF_SUCCESS
  472.             goto fatal
  473.         endif
  474.         SetRegValue $(KeyProduct) {MajorVersion,$(NoTitle),$(!REG_VT_SZ),$(ProductMajorVersion)}
  475.         SetRegValue $(KeyProduct) {MinorVersion,$(NoTitle),$(!REG_VT_SZ),$(ProductMinorVersion)}
  476.         OpenRegKey $(!REG_H_LOCAL) "" $(!NTN_ServiceBase)"\"$(ProductHardwareName)"\Linkage" $(MAXIMUM_ALLOWED) LinkageKey
  477.         ifstr(i) $(LinkageKey) != ""
  478.             GetRegValue $(LinkageKey) Bind BindInfo
  479.             ForListDo *($(BindInfo),4)
  480.                 Split-String $($) "\" CardInfo
  481.                 QueryListSize CardPos $(CardInfo)
  482.                 OpenRegKey $(!REG_H_LOCAL) "" $(!NTN_ServiceBase)"\"*($(CardInfo),$(CardPos))"\Parameters" $(MAXIMUM_ALLOWED) ParamKey
  483.                 ifstr $(ParamKey) != ""
  484.                     GetRegValue $(ParamKey) "Medium" MediumInfo
  485.                     set-add MediaType = *($(MediumInfo),4),1
  486.                     SetRegValue $(ParamKey) {MediaType,$(NoTitle),$(!REG_VT_DWORD),$(MediaType)}
  487.                     CloseRegKey $(ParamKey)
  488.                  endif
  489.              EndForListDo
  490.              CloseRegKey $(LinkageKey)
  491.         endif
  492.         CloseRegKey $(KeyProduct)
  493.     else
  494.         goto fatalregistry
  495.     endif
  496.     set iSearch = 1
  497. nextnetcard = +
  498.     Shell $(UtilityInf), FindNextNetworkCard, $(ProductHardwareName), $(iSearch)
  499.     set KeyNetcard = $($R0)
  500.     set iSearch = $($R1)
  501.     Debug-Output "OemNadEp.Inf: FindNextNetworkCard "$(KeyNetcard)","$(iSearch)
  502.     Ifstr $(KeyNetcard) != $(KeyNull)
  503.         Debug-Output "OemNadEp.Inf: Setting OperationsSupport value"
  504.         SetRegValue $(KeyNetcard) {OperationsSupport,$(NoTitle),$(!REG_VT_DWORD),$(ProductOpSupport)}
  505.         CloseRegKey $(KeyNetcard)
  506.         goto nextnetcard
  507.     Endif
  508.     goto end
  509. successful = +
  510.     goto end
  511. abandon = +
  512.     ForListDo $(OEM_ABANDON_OPTIONS)
  513.         Shell $(UtilityInf), RemoveHardwareComponent, $(Manufacturer), +
  514.             $(ProductSoftwareName), $($)
  515.         ifint $($ShellCode) != $(!SHELL_CODE_OK)
  516.             Debug-Output "ShellCode error"
  517.             goto ShellCodeError
  518.         endif
  519.         set RegistryErrorIndex = $($R0)
  520.         Ifstr(i) $(RegistryErrorIndex) != NO_ERROR
  521.             goto fatalregistry
  522.         endif
  523.     EndForListDo
  524.     Ifstr(i) $(OEM_ABANDON_SOFTWARE) == TRUE
  525.         Shell $(UtilityInf), RemoveSoftwareComponent, $(Manufacturer), +
  526.             $(ProductSoftwareName), FALSE
  527.         ifint $($ShellCode) != $(!SHELL_CODE_OK)
  528.             Debug-Output "ShellCode error"
  529.             goto ShellCodeError
  530.         endif
  531.         set RegistryErrorIndex = $($R0)
  532.         Ifstr(i) $(RegistryErrorIndex) != NO_ERROR
  533.             goto fatalregistry
  534.         endif
  535.     endif
  536.     goto end
  537. warning = +
  538.     Shell $(subroutineinf) SetupMessage, $(!STF_LANGUAGE), "WARNING", $(Error)
  539.     ifint $($ShellCode) != $(!SHELL_CODE_OK)
  540.         goto ShellCodeError
  541.     endif
  542.     ifstr(i) $($R1) == "OK"
  543.         goto $(to)
  544.     else-ifstr(i) $($R1) == "CANCEL"
  545.         goto $(from)
  546.     else
  547.         goto "end"
  548.     endif
  549. nonfatalinfo = +
  550.     Set CommonStatus = STATUS_USERCANCEL
  551.     Set Severity = STATUS
  552.     goto nonfatalmsg
  553. nonfatal = +
  554.     Set Severity = NONFATAL
  555.     goto nonfatalmsg
  556. nonfatalmsg = +
  557.     ifstr(i) $(Error) == ""
  558.         Set Severity = NONFATAL
  559.         Shell $(UtilityInf) RegistryErrorString "SETUP_FAIL"
  560.         ifint $($ShellCode) != $(!SHELL_CODE_OK)
  561.             goto ShellCodeError
  562.         endif
  563.         set Error = $($R0)
  564.     endif
  565.     Shell $(subroutineinf) SetupMessage, $(!STF_LANGUAGE), $(Severity), $(Error)
  566.     ifint $($ShellCode) != $(!SHELL_CODE_OK)
  567.         goto ShellCodeError
  568.     endif
  569.     ifstr(i) $($R1) == "OK"
  570.         goto $(from)
  571.     else
  572.         goto "end"
  573.     endif
  574. fatalregistry = +
  575.     Shell $(UtilityInf) RegistryErrorString $(RegistryErrorIndex)
  576.     ifint $($ShellCode) != $(!SHELL_CODE_OK)
  577.         goto ShellCodeError
  578.     endif
  579.     set Error = $($R0)
  580.     goto fatal
  581. fataldetect = +
  582.     ifstr(i) $(Error) == ""
  583.         Shell $(UtilityInf) RegistryErrorString "SETUP_FAIL"
  584.         ifint $($ShellCode) != $(!SHELL_CODE_OK)
  585.             goto ShellCodeError
  586.         endif
  587.         set Error = $($R0)
  588.     endif
  589.     Shell $(UtilityInf),RegistryErrorString,CANNOT_DETECT
  590.     ifint $($ShellCode) != $(!SHELL_CODE_OK)
  591.         Debug-Output "ShellCode error: cannot get an error string."
  592.         goto ShellCodeError
  593.     endif
  594.     set Error = $($R0)
  595.     Goto fatal
  596. fatal = +
  597.     Shell $(subroutineinf) SetupMessage, $(!STF_LANGUAGE), "FATAL", $(Error)
  598.     ifint $($ShellCode) != $(!SHELL_CODE_OK)
  599.         goto ShellCodeError
  600.     endif
  601.     goto setfailed
  602. ShellCodeError = +
  603.     set DlgType      = "MessageBox"
  604.     set STF_MB_TITLE = $(ShellCodeErrorTitle)
  605.     set STF_MB_TEXT  = $(ShellCodeErrorText)
  606.     set STF_MB_TYPE  = 1
  607.     set STF_MB_ICON  = 3
  608.     set STF_MB_DEF   = 1
  609.     ui start "Error Message"
  610.     goto setfailed
  611. setfailed = +
  612.     set CommonStatus = STATUS_FAILED
  613.     ifstr(i) $(OEM_ABANDON_ON) == TRUE
  614.         set OEM_ABANDON_ON = FALSE
  615.         goto abandon
  616.     endif
  617.     goto end
  618. end = +
  619.     goto term
  620. term = +
  621.     Return $(CommonStatus)
  622. [Install-Option]
  623.     set STF_VITAL = ""
  624.     ifstr(i) $(AddCopy) == "YES"
  625.         AddSectionFilesToCopyList Files-$(Option) $(SrcDir) $(!STF_WINDOWSSYSPATH)\drivers
  626.     endif
  627.     ifstr(i) $(DoCopy) == "YES"
  628.        set !STF_NCPA_FLUSH_COPYLIST = TRUE
  629.        CopyFilesInCopyList
  630.     endif
  631.     Exit
  632. [Install-Update]
  633.    set STF_VITAL        = ""
  634.    set STF_OVERWRITE    = "VERIFYSOURCEOLDER"
  635.    AddSectionFilesToCopyList Files-$(Option) $(SrcDir) $(!STF_WINDOWSSYSPATH)\drivers
  636.    exit
  637. [Source Media Descriptions]
  638.     1 = "Windows NT Server CD-ROM", TAGFILE = cdrom_s.40
  639. [Signature]
  640.     FileType = MICROSOFT_FILE
  641. [GetSignature]
  642.     read-syms Signature
  643.     return $(FileType)
  644. [ProductType]
  645. STF_PRODUCT  = LanmanNT
  646. STF_PLATFORM = I386
  647. [Files-Inf]
  648. 2,    oemsetup.inf,     SIZE=1000,    RENAME=$(!UG_Filename)
  649. [Files-LOOP]
  650. 1,LOOP.SYS , SIZE=999
  651. [LanguagesSupported]
  652.     ENG
  653. [OptionsTextENG]
  654.     LOOP     = "MS Loopback Adapter"
  655. [FileConstantsENG]
  656. ProCaption   = "Windows NT Setup"
  657. ProCancel    = "Cancel"
  658. ProCancelMsg = "Windows NT Networking is not correctly installed.  "+
  659.                "Are you sure you want to cancel copying files?"
  660. ProCancelCap = "Network Setup Message"
  661. ProText1     = "Copying:"
  662. ProText2     = "To:"
  663. FunctionTitle   = "MS Loopback Adapter Card Setup"
  664. ProductSoftwareDescription = "MS Loopback Adapter Driver"
  665. ProductHardwareDescription = "MS Loopback Adapter"
  666. ProductSoftwareTitle    = "MS Loopback Adapter Driver"
  667. ProductHardwareTitle    = "MS Loopback Adapter"
  668. ShellCodeErrorTitle     = "Error: "$(FunctionTitle)
  669. ShellCodeErrorText      = "Shell Code Error."
  670. [DialogConstantsENG]
  671. Help        = "&Help"
  672. Exit        = "Cancel"
  673. OK          = "OK"
  674. HelpContext = ""
  675. Continue    = "Continue"
  676. Cancel      = "Cancel"
  677. [FileDependentDlgENG]
  678. DlgType = "MultiCombo"
  679. DlgTemplate = "SINGLE_COMBO"
  680. Label1 = "&Frame Type:"
  681. Caption = $(FunctionTitle)
  682. Combo1List = $(MediaList)
  683. Combo1Out  = $(MediaChoice)
  684. ComboListItemsIn  = {Combo1List}
  685. ComboListItemsOut = {Combo1Out}
  686. HelpContext = $(!IDH_DB_OEMNADLB_INS)
  687.